# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelOperationMetadata do
  @moduledoc """
  Metadata of a labeling operation, such as LabelImage or LabelVideo. Next tag: 23

  ## Attributes

  *   `annotatedDataset` (*type:* `String.t`, *default:* `nil`) - Output only. The name of annotated dataset in format "projects/*/datasets/*/annotatedDatasets/*".
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when labeling request was created.
  *   `dataset` (*type:* `String.t`, *default:* `nil`) - Output only. The name of dataset to be labeled. "projects/*/datasets/*"
  *   `imageBoundingBoxDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageBoundingBoxOperationMetadata.t`, *default:* `nil`) - Details of label image bounding box operation.
  *   `imageBoundingPolyDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageBoundingPolyOperationMetadata.t`, *default:* `nil`) - Details of label image bounding poly operation.
  *   `imageClassificationDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageClassificationOperationMetadata.t`, *default:* `nil`) - Details of label image classification operation.
  *   `imageOrientedBoundingBoxDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageOrientedBoundingBoxOperationMetadata.t`, *default:* `nil`) - Details of label image oriented bounding box operation.
  *   `imagePolylineDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImagePolylineOperationMetadata.t`, *default:* `nil`) - Details of label image polyline operation.
  *   `imageSegmentationDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageSegmentationOperationMetadata.t`, *default:* `nil`) - Details of label image segmentation operation.
  *   `partialFailures` (*type:* `list(GoogleApi.DataLabeling.V1beta1.Model.GoogleRpcStatus.t)`, *default:* `nil`) - Output only. Partial failures encountered. E.g. single files that couldn't be read. Status details field will contain standard GCP error details.
  *   `progressPercent` (*type:* `integer()`, *default:* `nil`) - Output only. Progress of label operation. Range: [0, 100].
  *   `textClassificationDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelTextClassificationOperationMetadata.t`, *default:* `nil`) - Details of label text classification operation.
  *   `textEntityExtractionDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelTextEntityExtractionOperationMetadata.t`, *default:* `nil`) - Details of label text entity extraction operation.
  *   `videoClassificationDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoClassificationOperationMetadata.t`, *default:* `nil`) - Details of label video classification operation.
  *   `videoEventDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoEventOperationMetadata.t`, *default:* `nil`) - Details of label video event operation.
  *   `videoObjectDetectionDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoObjectDetectionOperationMetadata.t`, *default:* `nil`) - Details of label video object detection operation.
  *   `videoObjectTrackingDetails` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoObjectTrackingOperationMetadata.t`, *default:* `nil`) - Details of label video object tracking operation.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotatedDataset => String.t() | nil,
          :createTime => DateTime.t() | nil,
          :dataset => String.t() | nil,
          :imageBoundingBoxDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageBoundingBoxOperationMetadata.t()
            | nil,
          :imageBoundingPolyDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageBoundingPolyOperationMetadata.t()
            | nil,
          :imageClassificationDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageClassificationOperationMetadata.t()
            | nil,
          :imageOrientedBoundingBoxDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageOrientedBoundingBoxOperationMetadata.t()
            | nil,
          :imagePolylineDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImagePolylineOperationMetadata.t()
            | nil,
          :imageSegmentationDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageSegmentationOperationMetadata.t()
            | nil,
          :partialFailures =>
            list(GoogleApi.DataLabeling.V1beta1.Model.GoogleRpcStatus.t()) | nil,
          :progressPercent => integer() | nil,
          :textClassificationDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelTextClassificationOperationMetadata.t()
            | nil,
          :textEntityExtractionDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelTextEntityExtractionOperationMetadata.t()
            | nil,
          :videoClassificationDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoClassificationOperationMetadata.t()
            | nil,
          :videoEventDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoEventOperationMetadata.t()
            | nil,
          :videoObjectDetectionDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoObjectDetectionOperationMetadata.t()
            | nil,
          :videoObjectTrackingDetails =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoObjectTrackingOperationMetadata.t()
            | nil
        }

  field(:annotatedDataset)
  field(:createTime, as: DateTime)
  field(:dataset)

  field(:imageBoundingBoxDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageBoundingBoxOperationMetadata
  )

  field(:imageBoundingPolyDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageBoundingPolyOperationMetadata
  )

  field(:imageClassificationDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageClassificationOperationMetadata
  )

  field(:imageOrientedBoundingBoxDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageOrientedBoundingBoxOperationMetadata
  )

  field(:imagePolylineDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImagePolylineOperationMetadata
  )

  field(:imageSegmentationDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelImageSegmentationOperationMetadata
  )

  field(:partialFailures, as: GoogleApi.DataLabeling.V1beta1.Model.GoogleRpcStatus, type: :list)
  field(:progressPercent)

  field(:textClassificationDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelTextClassificationOperationMetadata
  )

  field(:textEntityExtractionDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelTextEntityExtractionOperationMetadata
  )

  field(:videoClassificationDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoClassificationOperationMetadata
  )

  field(:videoEventDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoEventOperationMetadata
  )

  field(:videoObjectDetectionDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoObjectDetectionOperationMetadata
  )

  field(:videoObjectTrackingDetails,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelVideoObjectTrackingOperationMetadata
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelOperationMetadata do
  def decode(value, options) do
    GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelOperationMetadata.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1alpha1LabelOperationMetadata do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
